package sarama

type KafkaOption struct {
	TLSOption  KafkaTLSOption  `json:"tls_option"  yaml:"tls_option"`
	CAOption   KafkaCAOption   `json:"ca_option" yaml:"ca_option"`
	SASLOption KafkaSASLOption `json:"sasl_option"   yaml:"sasl_option"`
	NetOption  KafkaNetOption  `json:"net_option"  yaml:"net_option"`
	Timeout    int             `json:"timeout"  yaml:"timeout"`
	Broker     []string        `json:"broker"  yaml:"broker"`
}

type KafkaTLSOption struct {
	Enable   bool   `json:"enable"  yaml:"enable"`
	CertPath string `json:"cert_path"  yaml:"cert_path"`
	KeyPath  string `json:"key_path"  yaml:"key_path"`
}

type KafkaNetOption struct {
	MaxOpenRequests int `json:"max_open_requests"  yaml:"max_open_requests"`
	DialTimeout     int `json:"dial_timeout"  yaml:"dial_timeout"`
	ReadTimeout     int `json:"read_timeout"  yaml:"read_timeout"`
	WriteTimeout    int `json:"write_timeout"  yaml:"write_timeout"`
}

type KafkaCAOption struct {
	Enable bool   `json:"enable"  yaml:"enable"`
	CAPath string `json:"ca_path"  yaml:"ca_path"`
}

type KafkaSASLOption struct {
	Enable   bool   `json:"enable"  yaml:"enable"`
	User     string `json:"user"  yaml:"user"`
	Password string `json:"password" yaml:"password"`
}
